<template>
    <h2>表格循环显示</h2>
    <table border="1">
        <thead>
            <tr>
                <td>账号</td>
                <td>姓名</td>
                <td>年龄</td>
                <td>地址</td>
            </tr>
            
        </thead>
        <tbody>
            <tr v-for="itme in info">
                <td>{{ itme.id }}</td>
                <td>{{ itme.name }}</td>
                <td>{{ itme.age }}</td>
                <td>{{ itme.address }}</td>
            </tr>
        </tbody>
    </table>


</template>

<script setup lang="ts">


//声明数组并初始化数据
const NameArry:string[]=['张三','李四','王五','赵六']
const info=[
    {
        id:101,
        name:'张三',
        age:30,
        address:"北京"

    },
    {
        id:102,
        name:'李四',
        age:30,
        address:"北京"

    },
    {
        id:103,
        name:'王五',
        age:30,
        address:"北京"

    },
    {
        id:104,
        name:'赵六',
        age:30,
        address:"北京"

    }
]

</script>